<?php
#                                                                                 
# author: Cody Sorgenfrey                                       
# (c)2013 South Hill Calvary Chapel                                               
#                                                                                 
include_once("../mysql/database_info.php");
include_once("../mysql/common.php");
include_once("../common.php");
connect_select_test("events");
$vars = explode("|row|", $_GET['vars']);
//real query
for($x=0;$x<count($vars);$x++){
	$row = explode("|cell|", $vars[$x]);
	$tableID = $row[0];
	$id = $row[1];
	$delete = "DELETE FROM `Registration_$tableID` ";
	$delete.="WHERE `id`='$id'";
	if (mysql_query($delete)){
		$response = "Deleted Rows.";
	} else {
		echo "Error. ".$delete;
		return 0;
	}
}
echo $response;
?>